package com.atguigu.spzx.manager.controller;

import com.atguigu.spyx.model.common.Result;
import com.atguigu.spyx.model.common.com.atguigu.spyx.model.entity.product.ProductUnit;
import com.atguigu.spzx.manager.service.ProductUnitService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LT
 * @create 2023-11-10-19:52
 */
@RestController
@RequestMapping("/admin/product/productUnit")
public class ProductUnitController {

    @Resource
    ProductUnitService productUnitService;

    @GetMapping("/findAll")
    public Result findAll(){
        List<ProductUnit> list = productUnitService.findAll();
        return Result.ok().data(list);
    }


}
